package top.stmo.stmoBlog.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.stmo.stmoBlog.dao.mapper.AboutMapper;
import top.stmo.stmoBlog.dao.pojo.About;
import top.stmo.stmoBlog.service.AboutService;

@Service
public class AboutServiceImpl implements AboutService {

    @Autowired
    private AboutMapper aboutMapper;

    @Override
    public String findBook() {
        LambdaQueryWrapper<About> queryWrapper = new LambdaQueryWrapper();
        queryWrapper.eq(About::getId,1);
        queryWrapper.select(About::getContentHtml);
        About about = aboutMapper.selectOne(queryWrapper);
        String bookHtml = about.getContentHtml();
        return bookHtml;
    }
}
